package com.yuju.order.enums;

public enum RoomOrderChangeReturnCodeEnum {
	ROOMORDERCHANGE_QUERY_SUCCESS("yuju-roomOrderChange-1000", "改单信息查询成功"),
	ROOMORDERCHANGE_QUERY_FAILURE("yuju-roomOrderChange-1001", "改单信息查询失败"),
	ROOMORDERCHANGE_SAVE_SUCCESS("yuju-roomOrderChange-1002", "改单信息保存成功"),
	ROOMORDERCHANGE_SAVE_FAILURE("yuju-roomOrderChange-1003", "改单信息保存失败"),
	ROOMORDERCHANGE_UPDATE_SUCCESS("yuju-roomOrderChange-1004", "改单信息更新成功"),
	ROOMORDERCHANGE_UPDATE_FAILURE("yuju-roomOrderChange-1005", "改单信息更新失败"),
	ROOMORDERCHANGE_DEL_SUCCESS("yuju-roomOrderChange-1006", "改单信息删除成功"),
	ROOMORDERCHANGE_DEL_FAILURE("yuju-roomOrderChange-1007", "改单信息删除失败");
	
	private String code;
	private String desc;
	
	RoomOrderChangeReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (InvoiceReturnCodeEnum enume : InvoiceReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
